Testing web services that are accessible via service oriented architecture (SOA) interceptors

ABSTRACT

Systems, methods, and computer program products are disclosed for testing web service-related elements, where the instructions of a web service-related element are statically analyzed to identify a characteristic of an output of the web service-related element, and where it is determined from a received response to a web service request that the web service request was processed by the web service-related element if at least a portion of the response matches the characteristic of the output of the web service-related element.

BACKGROUND

The present invention relates to computer software analysis and testingin general.

Computer software applications are often tested to determine whetherthey are vulnerable to malicious attacks or otherwise show signs ofsecurity vulnerabilities. One such type of testing known as “black-box”testing involves executing a computer software application and attackingthe application using known forms of malicious attacks. When performingblack-box testing on a computer software application it is important todetermine which part of the computer software application is vulnerableto a particular black-box attack. This is particularly challenging whenperforming black-box testing on web services, such as web services thatexpose one or more Application Programming Interfaces (APIs) that areaccessible via Hypertext Transfer Protocol (HTTP) for execution on oneor more computers, where the web services are accessible via a layer ofone or more Service Oriented Architecture (SOA) interceptors. Forexample, where a black-box attack is intended to test a particular webservice API for vulnerabilities, such as a web service API that containsbusiness logic, the attack may first have to go through several layersof SOA-related interceptors, such as those that are related toauthentication, authorization, session management, etc. Thus, when aresponse is received to the black-box attack on a web service API, it isimportant to determine whether the attack indeed reached its intendedtarget or whether the attack never made it past an intermediate webservice request interceptor.

SUMMARY

In one aspect of the invention a method is provided for testing webservice-related elements, the method including statically analyzinginstructions of a web service-related element to identify acharacteristic of an output of the web service-related element,receiving a response to a web service request, and determining that theweb service request was processed by the web service-related element ifat least a portion of the response matches the characteristic of theoutput of the web service-related element.

In other aspects of the invention one or more systems and computerprogram products are also provided.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The invention will be understood and appreciated more fully from thefollowing detailed description taken in conjunction with the appendeddrawings in which:

FIG. 1 is a simplified conceptual illustration of a system for testingweb services that are accessible via Service Oriented Architecture (SOA)interceptors, constructed and operative in accordance with an embodimentof the invention;

FIG. 2 is an example of user-name/token handler instructions of a webservice API that provides security for peer authentication, useful inunderstanding the invention;

FIG. 3 is a simplified flowchart illustration of an exemplary method ofoperation of the system of FIG. 1, operative in accordance with anembodiment of the invention;

FIG. 4 which is a simplified flowchart illustration of an exemplarymethod of operation of the system of FIG. 1, operative in accordancewith another embodiment of the invention; and

FIG. 5 is a simplified block diagram illustration of an exemplaryhardware implementation of a computing system, constructed and operativein accordance with an embodiment of the invention.

DETAILED DESCRIPTION

The invention is now described within the context of one or moreembodiments, although the description is intended to be illustrative ofthe invention as a whole, and is not to be construed as limiting theinvention to the embodiments shown. It is appreciated that variousmodifications may occur to those skilled in the art that, while notspecifically shown herein, are nevertheless within the true spirit andscope of the invention.

As will be appreciated by one skilled in the art, aspects of the presentinvention may be embodied as a system, method or computer programproduct. Accordingly, aspects of the present invention may take the formof an entirely hardware embodiment, an entirely software embodiment(including firmware, resident software, micro-code, etc.) or anembodiment combining software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”Furthermore, aspects of the present invention may take the form of acomputer program product embodied in one or more computer readablemedium(s) having computer readable program code embodied thereon.

Any combination of one or more computer readable medium(s) may beutilized. The computer readable medium may be a computer readable signalmedium or a computer readable storage medium. A computer readablestorage medium may be, for example, but not limited to, an electronic,magnetic, optical, electromagnetic, infrared, or semiconductor system,apparatus, or device, or any suitable combination of the foregoing. Morespecific examples (a non-exhaustive list) of the computer readablestorage medium would include the following: an electrical connectionhaving one or more wires, a portable computer diskette, a hard disk, arandom access memory (RAM), a read-only memory (ROM), an erasableprogrammable read-only memory (EPROM or Flash memory), an optical fiber,a portable compact disc read-only memory (CD-ROM), an optical datastorage device, a magnetic data storage device, or any suitablecombination of the foregoing. In the context of this document, acomputer readable storage medium may be any tangible medium that cancontain, or store a program for use by or in connection with aninstruction execution system, apparatus, or device.

A computer readable signal medium may include a propagated data signalwith computer readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Acomputer readable signal medium may be any computer readable medium thatis not a computer readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a computer readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thepresent invention may be written in any combination of one or moreprogramming languages, including an object oriented programming languagesuch as Java, Smalltalk, C++ or the like and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on theuser's computer, partly on the user's computer, as a stand-alonesoftware package, partly on the user's computer and partly on a remotecomputer or entirely on the remote computer or server. In the latterscenario, the remote computer may be connected to the user's computerthrough any type of network, including a local area network (LAN) or awide area network (WAN), or the connection may be made to an externalcomputer (for example, through the Internet using an Internet ServiceProvider).

Aspects of the present invention are described below with reference toflowchart illustrations and/or block diagrams of methods, apparatus(systems) and computer program products according to embodiments of theinvention. It will be understood that each block of the flowchartillustrations and/or block diagrams, and combinations of blocks in theflowchart illustrations and/or block diagrams, can be implemented bycomputer program instructions. These computer program instructions maybe provided to a processor of a general purpose computer, specialpurpose computer, or other programmable data processing apparatus toproduce a machine, such that the instructions, which execute via theprocessor of the computer or other programmable data processingapparatus, create means for implementing the functions/acts specified inthe flowchart and/or block diagram block or blocks.

These computer program instructions may also be stored in a computerreadable medium that can direct a computer, other programmable dataprocessing apparatus, or other devices to function in a particularmanner, such that the instructions stored in the computer readablemedium produce an article of manufacture including instructions whichimplement the function/act specified in the flowchart and/or blockdiagram block or blocks.

The computer program instructions may also be loaded onto a computer,other programmable data processing apparatus, or other devices to causea series of operational steps to be performed on the computer, otherprogrammable apparatus or other devices to produce a computerimplemented process such that the instructions which execute on thecomputer or other programmable apparatus provide processes forimplementing the functions/acts specified in the flowchart and/or blockdiagram block or blocks.

Reference is now made to FIG. 1 which is a simplified conceptualillustration of a system for testing web services that are accessiblevia Service Oriented Architecture (SOA) interceptors, constructed andoperative in accordance with an embodiment of the invention. In thesystem of FIG. 1, a static analyzer 100 is configured to staticallyanalyze one or more web service APIs, generally designated 102, such asmay be hosted by one or more computers accessible via a computer network(not shown). Web service APIs 102 may, for example, contain logicembodying the core functions of a business application. Static analyzer100 is additionally or alternatively configured to statically analyzeone or more SOA interceptors, generally designated 104, such as may behosted by one or more computers accessible via a computer network (notshown). SOA interceptors 104 may be layered with respect to each otherand to web service APIs 102, such as where web service APIs 102logically reside on top of a layered stack of SOA interceptors 104, suchas in the form of SOA handlers, related to authentication,authorization, and session management. Where SOA interceptors 104 arelayered in this manner, a web services request that is intended by arequestor to be processed by a particular one of web service APIs 102may first have to go through several layers of SOA interceptors 104. Webservice APIs 102 and SOA interceptors 104 are collectively referred toherein as web service-related elements.

Static analyzer 100 is configured in accordance with conventionaltechniques to statically analyze one or more web service-relatedelements, such as where the instructions are in the form of source codeor byte code, to identify the characteristics of one or more outputs ofthe web service-related elements, such as return values or exceptionvalues, as may be provided in response to a web service request. Suchcharacteristics preferably include the conditions that give rise to aparticular output, as well as the output value itself and/or a templatethereof. Examples of such outputs and their characteristics that areidentified by static analyzer 100 are described in greater detailhereinbelow with reference to FIG. 2.

A black-box tester 106 is shown in FIG. 1 and is configured tosynthesize one or more attacks in accordance with conventionaltechniques using the output characteristics of one or more webservice-related elements, such as those that are identified by staticanalyzer 100. In certain embodiments, the black-box tester 106 may bedescribed as performing dynamic-analysis to build web service requeststhat are able to exercise different layers in the SOA and obtainvalidation signals. Black-box tester 106 preferably presents an attackin the form of a web service request in an attempt to reach a target webservice-related element among the web service-related elements, such aswhere an attack is designed to test for security vulnerabilities in aparticular one of web service APIs 102 that contains a particularbusiness-related function. Black-box tester 106 is also preferablyconfigured to receive a response to such a web service request-basedattack, and to determine if the web service request was processed by thetarget web service-related element if at least a portion of the responsematches the characteristics of any of the outputs of the target webservice-related element, such as were previously identified by staticanalyzer 100. If no portion of the response matches the characteristicsof any of the outputs of the target web service-related element, thenthe web service request most likely was not processed by the target webservice-related element. Furthermore, if at least a portion of theresponse matches the characteristics of any of the outputs of a webservice-related element other than the target web service-relatedelement, then the web service request most likely was prevented by thenon-target web service-related element from reaching the target webservice-related element.

Any of the elements shown in FIG. 1 are preferably executed by orotherwise made accessible to a computer 108 such as by implementing anyof the elements in computer hardware and/or in computer softwareembodied in a physically-tangible, non-transitory, computer-readablemedium in accordance with conventional techniques.

The operation of FIG. 1 is illustrated with reference to FIG. 2 whichshows an example of user-name/token handler instructions 200 of a SOAinterceptor that provides security for peer authentication. Staticanalyzer 100 determines that for the instructions to complete their tasknormally, a received token should not be empty, and a password should befound for a given user. Static analyzer 100 identifies the output text“Token should not be null!” as associated with an argument-nullexception. Using this information, black-box tester 106 preferablysynthesizes one or more web service requests using conventionaltechniques in an attempt to reach a target web service API by providinginputs that satisfy all necessary pre-conditions of any intermediate SOAinterceptors like the SOA interceptor shown in FIG. 2, such as areidentified by static analyzer 100. Black-box tester 106 determineswhether a web service request reached its intended target web serviceAPI by analyzing a response to the web service request. Thus, if aresponse includes the message “Token should not be null!”, black-boxtester 106 determines that the web service request did not reach thetarget web service API, and was instead prevented from reaching thetarget web service API by the SOA interceptor shown in FIG. 2. Thus, theblack-box tester 106 validates behavior of each layer based onobservable indications of failure or success.

Reference is now made to FIG. 3 which is a simplified flowchartillustration of an exemplary method of operation of the system of FIG.1, operative in accordance with an embodiment of the invention. In themethod of FIG. 3, the instructions of one or more web service-relatedelements are statically analyzed to identify characteristics of one ormore of their outputs (block 300). One or more web service requests aresynthesized in an attempt to reach a target web service-related elementamong the statically analyzed web service-related elements (block 302).A response to a web service request is received (block 304). If at leasta portion of the response matches the known characteristics of any ofthe outputs of the target (block 306), then it is determined that theweb service request was processed by the target (block 308), whichinformation may be presented via a computer output device, such as acomputer display, otherwise, it is determined that the web servicerequest was not processed by the target (block 310). After blocks 308 or310, processing is finished.

Reference is now made to FIG. 4 which is a simplified flowchartillustration of an exemplary method of operation of the system of FIG.1, operative in accordance with another embodiment of the invention. Themethod of FIG. 4 is substantially similar to the method of FIG. 3, butmay be employed where different web service-related elements provide oneor more of the same outputs, such as where two or more webservice-related elements provide the same “ID is incorrect” message. Inthe method of FIG. 4, the instructions of one or more webservice-related elements are statically analyzed to identifycharacteristics of one or more of their outputs (block 400). If two ormore of the web service-related elements have an output that is the same(block 402), the input conditions that result in the outputs aredetermined (block 404), otherwise, the processing of FIG. 3 is performed(block 414). One or more web service requests are synthesized inaccordance with the input conditions in an attempt to reach a target webservice-related element among the statically analyzed webservice-related elements (block 406). A response to a web servicerequest is received (block 408). If at least a portion of the responsematches the known characteristics of any of the outputs of the target(block 410), then it is determined that the web service request wasprocessed by the target (block 412), which information may be presentedvia a computer output device, such as a computer display, otherwise, itis determined that the web service request was not processed by thetarget (block 416). After blocks 412 or 416, processing is finished.

Thus, for example, if static analysis determines that both anauthentication SOA interceptor and a business transaction web serviceAPI return an “ID is incorrect” message, where the authentication SOAinterceptor returns the “ID is incorrect” message if a received IDcontains one or more letters, and where the business transaction webservice API returns the “ID is incorrect” message if a received ID doesnot start with a letter, then this information may be used to formulatea web service request having the characteristics to trigger a responsefrom the web service API rather than the SOA interceptor, whereupon thereceived response may be analyzed to determine whether or not the webservice request reached the target web service API.

Referring now to FIG. 5, block diagram 500 illustrates an exemplaryhardware implementation of a computing system in accordance with whichone or more components/methodologies of the invention (e.g.,components/methodologies described in the context of FIGS. 1-4) may beimplemented, according to an embodiment of the invention.

As shown, the techniques for controlling access to at least one resourcemay be implemented in accordance with a processor 510, a memory 512, I/Odevices 514, and a network interface 516, coupled via a computer bus 518or alternate connection arrangement.

It is to be appreciated that the term “processor” as used herein isintended to include any processing device, such as, for example, onethat includes a CPU (central processing unit) and/or other processingcircuitry. It is also to be understood that the term “processor” mayrefer to more than one processing device and that various elementsassociated with a processing device may be shared by other processingdevices.

The term “memory” as used herein is intended to include memoryassociated with a processor or CPU, such as, for example, RAM, ROM, afixed memory device (e.g., hard drive), a removable memory device (e.g.,diskette), flash memory, etc. Such memory may be considered a computerreadable storage medium.

In addition, the phrase “input/output devices” or “I/O devices” as usedherein is intended to include, for example, one or more input devices(e.g., keyboard, mouse, scanner, etc.) for entering data to theprocessing unit, and/or one or more output devices (e.g., speaker,display, printer, etc.) for presenting results associated with theprocessing unit.

The flowchart and block diagrams in the Figures illustrate thearchitecture, functionality, and operation of possible implementationsof systems, methods and computer program products according to variousembodiments of the invention. In this regard, each block in theflowchart or block diagrams may represent a module, segment, or portionof code, which comprises one or more executable instructions forimplementing the specified logical function(s). It should also be notedthat, in some alternative implementations, the functions noted in theblock may occur out of the order noted in the figures. For example, twoblocks shown in succession may, in fact, be executed substantiallyconcurrently, or the blocks may sometimes be executed in the reverseorder, depending upon the functionality involved. It will also be notedthat each block of the block diagrams and/or flowchart illustration, andcombinations of blocks in the block diagrams and/or flowchartillustration, can be implemented by special purpose hardware-basedsystems that perform the specified functions or acts, or combinations ofspecial purpose hardware and computer instructions.

It will be appreciated that any of the elements described hereinabovemay be implemented as a computer program product embodied in acomputer-readable medium, such as in the form of computer programinstructions stored on magnetic or optical storage media or embeddedwithin computer hardware, and may be executed by or otherwise accessibleto a computer (not shown).

While the methods and apparatus herein may or may not have beendescribed with reference to specific computer hardware or software, itis appreciated that the methods and apparatus described herein may bereadily implemented in computer hardware or software using conventionaltechniques.

While the invention has been described with reference to one or morespecific embodiments, the description is intended to be illustrative ofthe invention as a whole and is not to be construed as limiting theinvention to the embodiments shown. It is appreciated that variousmodifications may occur to those skilled in the art that, while notspecifically shown herein, are nevertheless within the true spirit andscope of the invention.

What is claimed is:
 1. A method for testing web service-relatedelements, the method comprising: statically analyzing instructions of aplurality of web service-related elements, including a target webservice-related element to identify a characteristic of an output ofeach web service-related element, wherein the target web service-relatedelement is a web service exposed application programming interface(API); determining that at least two of the plurality of webservice-related elements have a same output; in response to determiningthat at least two of the plurality of web service-related elements havethe same output, determining an input condition for each of the at leasttwo of the plurality of web service-related elements that results in thesame output; synthesizing an attack on the target web service-relatedelement using the characteristic of the same output of the target webservice-related element and the input condition that results in the sameoutput; presenting the attack in the form of a web service request toattempt to reach the target web service-related element through aplurality of other web-service related elements layered with respect toeach other; receiving a response to the web service request sent to thetarget web service-related element through one or more of the otherweb-service related elements; and in response to determining that atleast a portion of the response matches the characteristic of the outputof the target web service-related element, determining that the webservice request was processed by the target web service-related element.2. The method according to claim 1 wherein statically analyzingcomprises statically analyzing multiple web service-exposed applicationprogramming interfaces (APIs).
 3. The method according to claim 1wherein statically analyzing comprises statically analyzing the webservice-exposed API that contains logic embodying a core function of abusiness application.
 4. The method according to claim 1 whereinstatically analyzing comprises statically analyzing a Service OrientedArchitecture (SOA) interceptor that relates to one of authentication,authorization, and session management.
 5. The method according to claim1 wherein statically analyzing comprises statically analyzing the webservice-exposed API and a Service Oriented Architecture (SOA)interceptor.
 6. The method according to claim 1 wherein staticallyanalyzing comprises identifying one of a return value and an exceptionvalue of the target web service-related element.
 7. The method accordingto claim 1 and further comprising: in response to determining that atleast a portion of the response matches a characteristic of output of anService Oriented Architecture (SOA) interceptor from among the pluralityof SOA interceptors, identifying the SOA interceptor from among theplurality of SOA interceptors as having prevented the web servicerequest from reaching the target web service-related element.
 8. Asystem for testing web service-related elements, the system comprising:a processor; and storage coupled to the processor, wherein the storagestores computer program instructions, wherein the computer programinstructions, when executed by the processor, perform: staticallyanalyzing instructions of a plurality of web service-related elements,including a target web service-related element to identify acharacteristic of an output of each web service-related element, whereinthe target web service-related element is a web service exposedapplication programming interface (API); determining that at least twoof the plurality of web service-related elements have a same output; inresponse to determining that at least two of the plurality of webservice-related elements have the same output, determining an inputcondition for each of the at least two of the plurality of webservice-related elements that results in the same output; synthesizingan attack on the target web service-related element using thecharacteristic of the same output of the target web service-relatedelement and the input condition that results in the same output;presenting the attack in the form of a web service request to attempt toreach the target web service-related element through a plurality ofother web-service related elements layered with respect to each other;receiving a response to the web service request sent to the target webservice-related element through one or more of the other web-servicerelated elements; and in response to determining that at least a portionof the response matches the characteristic of the output of the targetweb service-related element, determining that the web service requestwas processed by the target web service-related element.
 9. The systemaccording to claim 8 wherein statically analyzing comprises staticallyanalyzing multiple web service-exposed application programminginterfaces (APIs).
 10. The system according to claim 8 whereinstatically analyzing comprises statically analyzing a webservice-exposed API that contains logic embodying a core function of abusiness application.
 11. The system according to claim 8 whereinstatically analyzing comprises statically analyzing a Service OrientedArchitecture (SOA) interceptor that relates to one of authentication,authorization, and session management.
 12. The system according to claim8 wherein statically analyzing comprises statically analyzing the webservice-exposed API and a Service Oriented Architecture (SOA)interceptor.
 13. The system according to claim 8 wherein staticallyanalyzing comprises identifying one of a return value and an exceptionvalue of the target web service-related element.
 14. The systemaccording to claim 8, wherein the operations further comprise: inresponse to determining that at least a portion of the response matchesa characteristic of output of an Service Oriented Architecture (SOA)interceptor from among the plurality of SOA interceptors, identifyingthe SOA interceptor from among the plurality of SOA interceptors ashaving prevented the web service request from reaching the target webservice-related element.
 15. A computer program product for testing webservice-related elements, the computer program product comprising: acomputer-readable storage device; and computer-readable program codeembodied in the computer-readable storage device, wherein thecomputer-readable program code is configured to: statically analyzeinstructions of a plurality of web service-related elements, including atarget web service-related element to identify a characteristic of anoutput of each web service-related element, wherein the target webservice-related element is a web service exposed application programminginterface (API); determining that at least two of the plurality of webservice-related elements have a same output; in response to determiningthat at least two of the plurality of web service-related elements havethe same output, determining an input condition for each of the at leasttwo of the plurality of web service-related elements that results in thesame output; synthesizing an attack on the target web service-relatedelement using the characteristic of the same output of the target webservice-related element and the input condition that results in the sameoutput; presenting the attack in the form of the web service request toattempt to reach the target web service-related element through aplurality of other web-service related elements layered with respect toeach other; receive a response to the web service request sent to thetarget web service-related element through one or more of the otherweb-service related elements; in response to determining that at least aportion of the response matches the characteristic of the output of thetarget web service-related element, determine that the web servicerequest was processed by the target web service-related element.
 16. Thecomputer program product according to claim 15 wherein thecomputer-readable program code is configured to identify one of a returnvalue and an exception value of the target web service-related element.17. The computer program product according to claim 15 whereinstatically analyzing comprises statically analyzing multiple webservice-exposed application programming interfaces (APIs).
 18. Thecomputer program product according to claim 15 wherein staticallyanalyzing comprises statically analyzing the web service-exposed APIthat contains logic embodying a core function of a business application.19. The computer program product according to claim 15 whereinstatically analyzing comprises statically analyzing a Service OrientedArchitecture (SOA) interceptor that relates to one of authentication,authorization, and session management.
 20. The computer program productaccording to claim 15 wherein statically analyzing comprises staticallyanalyzing the web service-exposed API and a Service OrientedArchitecture (SOA) interceptor.
 21. The computer program productaccording to claim 15, wherein the computer-readable program code isconfigured to: in response to determining that at least a portion of theresponse matches a characteristic of output of an Service OrientedArchitecture (SOA) interceptor from among the plurality of SOAinterceptors, identify the SOA interceptor from among the plurality ofSOA interceptors as having prevented the web service request fromreaching the target web service-related element.